﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
//using BTGISWASECO.BusinessEntities;

/// <summary>
/// Summary description for OngPhanPhoiEntities
/// </summary>
namespace BTGISWASECO.BusinessEntities
{
    public class OngPhanPhoiEntities
    {
        #region khai bao thuoc tinh
        private int _objectID;
        private string _IDMaDoanOng;
        private string _IDDMZ;
        private string _IDDMA;
        private double _ChieuDai;
        private int _HuongDongChay;
        private string _HuongDongChayText;       
        private int _VatLieu;
        private string _VatLieuText;
        private int _TieuChuan;
        private string _TieuChuanText;
        private int _Hieu;
        private string _HieuText;
        private int _NuocSanXuat;
        private string _NuocSanXuatText;
        private double _DoNhamThucTe;
        private double _ApLucThietKe;
        private int _NamLapDat;
        private int _NamSanXuat;
        private string _MoTaViTri;
        private double _DoSau;
        private double _DoDoc;
        private double _DoNhamDanhDinh;
        private int _TinhTrang;
        private string _TinhTrangText;
        private double _ALHoatDong;
        private double _DKTrong;
        private double _DKNgoai;
        private string _CoOng;
        private string _CoOngText;
        private string _CapOngText;
        private int _CapOng;
        private int _LoaiNuoc;
        private string _LoaiNuocText;
        private int _DonViTK;
        private string _DonViTKText;
        private int _ThuocSoHuu;
        private string _ThuocSoHuuText;
        private DateTime _NgayCNCuoi;
        private string _NguoiCNCuoi;
        private string _IDHinhAnh;
        private string _GhiChu;
        private int _LoaiOngNuoc;
        private string _LoaiVatLieu;
        private int _NhaSanXuat;
        private string _NhaSanXuatText;
        private int _SoLanSuCo;
        private string _DiemDau;
        private string _DiemCuoi;
        private int _DonViTC;
        private string _DonViTCText;
        private int _DonViGS;
        private string _DonViGSText;

        public string DonViGSText
        {
            get { return _DonViGSText; }
            set { _DonViGSText = value; }
        }


        public int DonViGS
        {
            get { return _DonViGS; }
            set { _DonViGS = value; }
        }

        public string DonViTCText
        {
            get { return _DonViTCText; }
            set { _DonViTCText = value; }
        }

        public int DonViTC
        {
            get { return _DonViTC; }
            set { _DonViTC = value; }
        }

        public int NamSanXuat
        {
            get { return _NamSanXuat; }
            set { _NamSanXuat = value; }
        }

        public string DiemCuoi
        {
            get { return _DiemCuoi; }
            set { _DiemCuoi = value; }
        }

        public string DiemDau
        {
            get { return _DiemDau; }
            set { _DiemDau = value; }
        }

        public int SoLanSuCo
        {
            get { return _SoLanSuCo; }
            set { _SoLanSuCo = value; }
        }


        public string CoOngText
        {
            get { return _CoOngText; }
            set { _CoOngText = value; }
        }

        public string NhaSanXuatText
        {
            get { return _NhaSanXuatText; }
            set { _NhaSanXuatText = value; }
        }

        public string LoaiVatLieu
        {
            get { return _LoaiVatLieu; }
            set { _LoaiVatLieu = value; }
        }

        public string ThuocSoHuuText
        {
            get { return _ThuocSoHuuText; }
            set { _ThuocSoHuuText = value; }
        }

        public string DonViTKText
        {
            get { return _DonViTKText; }
            set { _DonViTKText = value; }
        }

        public string LoaiNuocText
        {
            get { return _LoaiNuocText; }
            set { _LoaiNuocText = value; }
        }

        public string TinhTrangText
        {
            get { return _TinhTrangText; }
            set { _TinhTrangText = value; }
        }

        public string NuocSanXuatText
        {
            get { return _NuocSanXuatText; }
            set { _NuocSanXuatText = value; }
        }

        public string HieuText
        {
            get { return _HieuText; }
            set { _HieuText = value; }
        }

        public string TieuChuanText
        {
            get { return _TieuChuanText; }
            set { _TieuChuanText = value; }
        }

        public string VatLieuText
        {
            get { return _VatLieuText; }
            set { _VatLieuText = value; }
        }

        public string CapOngText
        {
            get { return _CapOngText; }
            set { _CapOngText = value; }
        }

        public int HuongDongChay
        {
            get { return _HuongDongChay; }
            set { _HuongDongChay = value; }
        }

        public string HuongDongChayText
        {
            get { return _HuongDongChayText; }
            set { _HuongDongChayText = value; }
        }

        public int NhaSanXuat
        {
            get { return _NhaSanXuat; }
            set { _NhaSanXuat = value; }
        }

        public int LoaiOngNuoc
        {
            get { return _LoaiOngNuoc; }
            set { _LoaiOngNuoc = value; }
        }

        public string GhiChu
        {
            get { return _GhiChu; }
            set { _GhiChu = value; }
        }


        public string IDHinhAnh
        {
            get { return _IDHinhAnh; }
            set { _IDHinhAnh = value; }
        }

        public string NguoiCNCuoi
        {
            get { return _NguoiCNCuoi; }
            set { _NguoiCNCuoi = value; }
        }


        public DateTime NgayCNCuoi
        {
            get { return _NgayCNCuoi; }
            set { _NgayCNCuoi = value; }
        }

        public int ThuocSoHuu
        {
            get { return _ThuocSoHuu; }
            set { _ThuocSoHuu = value; }
        }

        public int DonViTK
        {
            get { return _DonViTK; }
            set { _DonViTK = value; }
        }

        public int LoaiNuoc
        {
            get { return _LoaiNuoc; }
            set { _LoaiNuoc = value; }
        }

        public int CapOng
        {
            get { return _CapOng; }
            set { _CapOng = value; }
        }

        public string CoOng
        {
            get { return _CoOng; }
            set { _CoOng = value; }
        }

        public double DKNgoai
        {
            get { return _DKNgoai; }
            set { _DKNgoai = value; }
        }

        public double DKTrong
        {
            get { return _DKTrong; }
            set { _DKTrong = value; }
        }


        public double ALHoatDong
        {
            get { return _ALHoatDong; }
            set { _ALHoatDong = value; }
        }

        public int TinhTrang
        {
            get { return _TinhTrang; }
            set { _TinhTrang = value; }
        }

        public double DoNhamDanhDinh
        {
            get { return _DoNhamDanhDinh; }
            set { _DoNhamDanhDinh = value; }
        }

        public double DoDoc
        {
            get { return _DoDoc; }
            set { _DoDoc = value; }
        }

        public double DoSau
        {
            get { return _DoSau; }
            set { _DoSau = value; }
        }

        public string MoTaViTri
        {
            get { return _MoTaViTri; }
            set { _MoTaViTri = value; }
        }

        public int NamLapDat
        {
            get { return _NamLapDat; }
            set { _NamLapDat = value; }
        }

        public double ApLucThietKe
        {
            get { return _ApLucThietKe; }
            set { _ApLucThietKe = value; }
        }


        public double DoNhamThucTe
        {
            get { return _DoNhamThucTe; }
            set { _DoNhamThucTe = value; }
        }

        public int NuocSanXuat
        {
            get { return _NuocSanXuat; }
            set { _NuocSanXuat = value; }
        }

        public int TieuChuan
        {
            get { return _TieuChuan; }
            set { _TieuChuan = value; }
        }
        
        public int VatLieu
        {
            get { return _VatLieu; }
            set { _VatLieu = value; }
        }
        
        public int Hieu
        {
            get { return _Hieu; }
            set { _Hieu = value; }
        }
        
        public int OBJECTID
        {
            get { return _objectID; }
            set { _objectID = value; }
        }

        public string IDMaDoanOng
        {
            get { return _IDMaDoanOng; }
            set { _IDMaDoanOng = value; }
        }

        public string IDDMZ
        {
            get { return _IDDMZ; }
            set { _IDDMZ = value; }
        }

        public string IDDMA
        {
            get { return _IDDMA; }
            set { _IDDMA = value; }
        }

        public double ChieuDai
        {
            get { return _ChieuDai; }
            set { _ChieuDai = value; }
        }

        # endregion khai bao

        #region phuong thuc

        public OngPhanPhoiEntities()
        {

        }

        public OngPhanPhoiEntities(string IDMaDoanOng, string IDDMZ, string IDDMA, int HuongDongChay, double ChieuDai, double DKTrong, double DKNgoai, string CoOng,
                                   int VatLieu,int TieuChuan, int NhaSanXuat, int NuocSanXuat, int NamSanXuat, int NamLapDat, double DoNhamDanhDinh, 
                                   double DoNhamThucTe,double ALHoatDong, double ApLucThietKe, string DiemDau, string DiemCuoi, double DoSau, double DoDoc,
                                   int TinhTrang, int SoLanSuCo, int DonViTK, int DonViTC, int DonViGS, string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu,
                                   string IDHinhAnh, string LoaiVatLieu)
        {
            //Begin Ninh Thuan
            this._IDMaDoanOng = IDMaDoanOng;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._HuongDongChay = HuongDongChay;
            this._ChieuDai = ChieuDai;
            this._DKTrong = DKTrong;
            this._DKNgoai = DKNgoai;
            this._CoOng = CoOng;
            this._VatLieu = VatLieu;
            this._TieuChuan = TieuChuan;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamSanXuat = NamSanXuat;
            this._NamLapDat = NamLapDat;
            this._DoNhamDanhDinh = DoNhamDanhDinh;
            this._DoNhamThucTe = DoNhamThucTe;
            this._ALHoatDong = ALHoatDong;
            this._ApLucThietKe = ApLucThietKe;
            this._DiemDau = DiemDau;
            this._DiemCuoi = DiemCuoi;
            this._DoSau = DoSau;
            this._DoDoc = DoDoc;
            this._TinhTrang = TinhTrang;
            this._SoLanSuCo = SoLanSuCo;
            this._DonViTK = DonViTK;
            this._DonViTC = DonViTC;
            this._DonViGS = DonViGS;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
            this._LoaiVatLieu = LoaiVatLieu;
        }
        public OngPhanPhoiEntities(int OBJECTID, string IDMaDoanOng, string IDDMZ, string IDDMA, int HuongDongChay, double ChieuDai, double DKTrong, double DKNgoai, string CoOng,
                                   int VatLieu, int TieuChuan, int NhaSanXuat, int NuocSanXuat, int NamSanXuat, int NamLapDat, double DoNhamDanhDinh,
                                   double DoNhamThucTe, double ALHoatDong, double ApLucThietKe, string DiemDau, string DiemCuoi, double DoSau, double DoDoc,
                                   int TinhTrang, int SoLanSuCo, int DonViTK, int DonViTC, int DonViGS, string NguoiCNCuoi, DateTime NgayCNCuoi, string GhiChu,
                                   string IDHinhAnh, string LoaiVatLieu)
        {
            this._objectID = OBJECTID;
            //Begin Ninh Thuan
            this._IDMaDoanOng = IDMaDoanOng;
            this._IDDMZ = IDDMZ;
            this._IDDMA = IDDMA;
            this._HuongDongChay = HuongDongChay;
            this._ChieuDai = ChieuDai;
            this._DKTrong = DKTrong;
            this._DKNgoai = DKNgoai;
            this._CoOng = CoOng;
            this._VatLieu = VatLieu;
            this._TieuChuan = TieuChuan;
            this._NhaSanXuat = NhaSanXuat;
            this._NuocSanXuat = NuocSanXuat;
            this._NamSanXuat = NamSanXuat;
            this._NamLapDat = NamLapDat;
            this._DoNhamDanhDinh = DoNhamDanhDinh;
            this._DoNhamThucTe = DoNhamThucTe;
            this._ALHoatDong = ALHoatDong;
            this._ApLucThietKe = ApLucThietKe;
            this._DiemDau = DiemDau;
            this._DiemCuoi = DiemCuoi;
            this._DoSau = DoSau;
            this._DoDoc = DoDoc;
            this._TinhTrang = TinhTrang;
            this._SoLanSuCo = SoLanSuCo;
            this._DonViTK = DonViTK;
            this._DonViTC = DonViTC;
            this._DonViGS = DonViGS;
            this._NguoiCNCuoi = NguoiCNCuoi;
            this._NgayCNCuoi = NgayCNCuoi;
            this._GhiChu = GhiChu;
            this.IDHinhAnh = IDHinhAnh;
            //End Ninh Thuan
            this._LoaiVatLieu = LoaiVatLieu;
        }

        public OngPhanPhoiEntities(DataRow row)
        {
            this._objectID = Convert.ToInt32(row["objectID"]);
            this._IDMaDoanOng = row["IDDoanOng"].ToString();
            this._IDDMA = row["IDDMA"].ToString();
            this._IDDMZ = row["IDDMZ"].ToString();
            this._HuongDongChayText = row["HuongDongChay"].ToString();
            if (row["ChieuDai"].ToString() != "Null")
                this._ChieuDai = Convert.ToDouble(row["ChieuDai"]);
            if (row["DKTrong"].ToString() != "Null")
                this._DKTrong = Convert.ToDouble(row["DKTrong"]);
            if (row["DKNgoai"].ToString() != "Null")
                this._DKNgoai = Convert.ToDouble(row["DKNgoai"]);
            if (row["CoOng"].ToString() != "Null")
                this._CoOngText = row["CoOng"].ToString();
            this._VatLieuText = row["VatLieu"].ToString();
            this._TieuChuanText = row["TieuChuanVL"].ToString();
            this._NhaSanXuatText = row["NhaSanXuat"].ToString();
            this._NuocSanXuatText = row["NuocSanXuat"].ToString();
            if (row["NamSanXuat"].ToString() != "Null")
                this._NamSanXuat = Convert.ToInt32(row["NamSanXuat"]);
            if (row["NamLapDat"].ToString() != "Null")
                this._NamLapDat = Convert.ToInt32(row["NamLapDat"]);
            if (row["DoNhamDanhDinh"].ToString() != "Null")
                this._DoNhamDanhDinh = Convert.ToDouble(row["DoNhamDanhDinh"]);
            if (row["DoNhamThucTe"].ToString() != "Null")
                this._DoNhamThucTe = Convert.ToDouble(row["DoNhamThucTe"]);
            if (row["ALHoatDong"].ToString() != "Null")
                this._ALHoatDong = Convert.ToDouble(row["ALHoatDong"]);
            if (row["ApLucThietKe"].ToString() != "Null")
                this._ApLucThietKe = Convert.ToDouble(row["ApLucThietKe"]);
            this._DiemDau = row["DiemDau"].ToString();
            this._DiemCuoi = row["DiemCuoi"].ToString();
            if (row["DoSau"].ToString() != "Null")
                this._DoSau = Convert.ToDouble(row["DoSau"]);
            if (row["DoDoc"].ToString() != "Null")
                this._DoDoc = Convert.ToDouble(row["DoDoc"]);           
            this._TinhTrangText = row["TinhTrang"].ToString();
            if (row["SoLanSuCo"].ToString() != "Null")
                this._SoLanSuCo = Convert.ToInt32(row["SoLanSuCo"]);
            if (row["DonViTK"].ToString() != "Null")
                this._DonViTKText = row["DonViTK"].ToString();
            if (row["DonViTC"].ToString() != "Null")
                this._DonViTCText = row["DonViTC"].ToString();
            if (row["DonViGS"].ToString() != "Null")
                this._DonViGSText = row["DonViGS"].ToString();
            if (row["NgayCNCuoi"].ToString() != "Null")
                this._NgayCNCuoi = Convert.ToDateTime(row["NgayCNCuoi"]);
            this._NguoiCNCuoi = row["NguoiCNCuoi"].ToString();
            this._IDHinhAnh = row["IDHinhAnh"].ToString();
            this._GhiChu = row["GhiChu"].ToString();
            //if (row["LoaiVatLieu"].ToString() != "Null")
                this._LoaiVatLieu = row["LoaiVatLieu"].ToString();
            
        }


        //public OngPhanPhoiEntities OngPhanPhoiIDataReader(IDataReader dr)
        //{
        //    BTGISWASECO.BusinessEntities.OngPhanPhoiEntities obj = new BTGISWASECO.BusinessEntities.OngPhanPhoiEntities();
        //    obj._objectID = (dr["ObjectID"] is DBNull) ? -1 : Convert.ToInt32(dr["ObjectID"]);
        //    obj._IDMaDoanOng = (dr["IDMaDoanOng"] is DBNull) ? string.Empty : dr["_IDMaDoanOng"].ToString();
        //    obj._IDDMA = (dr["IDDMA"] is DBNull) ? string.Empty : dr["_IDDMA"].ToString();
        //    obj._HuongDongChay = (Convert.ToInt32(dr["HuongDongChay"]) >= 0) ? 0 : Convert.ToInt32(dr["HuongDongChay"]);
        //    obj._ChieuDai = (dr["ChieuDai"] is DBNull) ? 0 : Convert.ToInt32(dr["ChieuDai"]);
        //    return obj;
        //}

        #endregion phuong thuc
    }
}